Ext.override(Ext.MessageBox, {
	init : function() {
		this.addEvents(
				/**
				 * @event beforeshow Fires before the component is shown
				 *        by calling the {@link #show} method. Return
				 *        false from an event handler to stop the show.
				 * @param {Ext.Component}
				 *            this
				 */
				'beforeshow');
	},
	show : function(options) {
		this.fireEvent('beforeshow', this);
		if (this.isVisible()) {
			this.hide();
		}
		opt = options;
		var d = this.getDialog(opt.title || "&#160;");

		d.setTitle(opt.title || "&#160;");
		var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true);
		d.tools.close.setDisplayed(allowClose);
		activeTextEl = textboxEl;
		opt.prompt = opt.prompt || (opt.multiline ? true : false);
		if (opt.prompt) {
			if (opt.multiline) {
				textboxEl.hide();
				textareaEl.show();
				textareaEl.setHeight(Ext.isNumber(opt.multiline)
						? opt.multiline
						: this.defaultTextHeight);
				activeTextEl = textareaEl;
			} else {
				textboxEl.show();
				textareaEl.hide();
			}
		} else {
			textboxEl.hide();
			textareaEl.hide();
		}
		activeTextEl.dom.value = opt.value || "";
		if (opt.prompt) {
			d.focusEl = activeTextEl;
		} else {
			var bs = opt.buttons;
			var db = null;
			if (bs && bs.ok) {
				db = buttons["ok"];
			} else if (bs && bs.yes) {
				db = buttons["yes"];
			}
			if (db) {
				d.focusEl = db;
			}
		}
		if (Ext.isDefined(opt.iconCls)) {
			d.setIconClass(opt.iconCls);
		}
		this.setIcon(Ext.isDefined(opt.icon) ? opt.icon : bufferIcon);
		bwidth = updateButtons(opt.buttons);
		progressBar.setVisible(opt.progress === true || opt.wait === true);
		this.updateProgress(0, opt.progressText);
		this.updateText(opt.msg);
		if (opt.cls) {
			d.el.addClass(opt.cls);
		}
		d.proxyDrag = opt.proxyDrag === true;
		d.modal = opt.modal !== false;
		d.mask = opt.modal !== false ? mask : false;
		if (!d.isVisible()) {
			// force it to the end of the z-index stack so it gets a cursor in FF
			document.body.appendChild(dlg.el.dom);
			d.setAnimateTarget(opt.animEl);
			//workaround for window internally enabling keymap in afterShow
			d.on('show', function() {
						if (allowClose === true) {
							d.keyMap.enable();
						} else {
							d.keyMap.disable();
						}
					}, this, {
						single : true
					});
			d.show(opt.animEl);
		}
		if (opt.wait === true) {
			progressBar.wait(opt.waitConfig);
		}
		return this;
	},
	beforeshow : function(){
		alert("hi");
	}
	

});